<!--系统设置数据管理页面-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>数据管理</title>
    <link rel="stylesheet" href="../css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">MISS后台管理系统</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    username
                </a>
            </li>
            <li class="layui-nav-item"><a href="">注销</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
		    	<li class="layui-nav-item">
		        	<a href="index.html">首页</a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">散客开单</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Guests_check_in.html">宾客入住</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">订单</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Order.html">所有订单</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">宾客结账</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Ordinary_invoicing.html">普通结账</a></dd>
                        <dd><a href="Members_to_check.html">会员结账</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">预定管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Add_a_reservation.html">添加预定</a></dd>
                        <dd><a href="Delete_reservation.html">删除预定</a></dd>
                        <dd><a href="Edit_reservation.html">编辑预定</a></dd>
                        <dd><a href="Query_book.html">查询预定</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item ">
                    <a href="javascript:;">营业查询</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Room_query.html">房间查询</a></dd>
                        <dd><a href="Check-in_guest_enquiry.html">入住宾客查询</a></dd>
                        <dd><a href="Member_of_the_query.html">会员查询</a></dd>
                        <dd><a href="Fuzzy_membership_query.html" >模糊查询会员</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:;">系统设置</a>
                    <dl class="layui-nav-child">
                        <dd><a href="Data_management.html" style="background-color: #1E90FF">数据管理</a></dd>
                        <dd><a href="VIP_set_up.html">VIP设置</a></dd>
                        <dd><a href="Billing_Settings.html">计费设置</a></dd>
                        <dd><a href="Set_up_the_room.html">房间设置</a></dd>
                        <dd><a href="Operator_setup.html">操作员设置</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body layui-bg-green">
        <div style="padding: 15px;">
        	
            <div class="layui-col-md5" style="padding-left: 200px;padding-top: 100px;">
            	<button class="layui-btn layui-btn-warm" onclick="backups()">数据备份</button>
            </div>
            <div id="warning" class="layui-col-md5" style="padding-left: 200px;padding-top: 100px;">
            	<div style="display: inline-block;" onmousemove="warning()" onmouseleave="hide()"><button onclick="reduction()" class="layui-btn layui-btn-danger">数据还原</button></div>
            	<span class="layui-hide" style="color: red;">警告！是否确认还原</span>
            </div>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © MISS酒店
    </div>
</div>
<script src="../js/layui.all.js"></script>
<script src="../js/jquery.min.js"></script>
<script>
	
	function warning(){
		$("#warning span:last").removeClass("layui-hide");
	}
	
	function hide(){
		$("#warning span:last").addClass("layui-hide")
	}
	/* 备份方法 */
	function backups(){
		$.ajax({
			 type:"post",
			  url:"/data",
			async:true,
			success:function(mes){
				alert("备份成功");
			},
			error:function(mes){
				alert("备份失败")
			}
			
		});
	}
	
	/* 还原方法 */
	function reduction(){
		$.ajax({
			 type:"get",
			  url:"/data",
			async:true,
			success:function(mes){
				alert("还原成功");
			},
			error:function(mes){
				alert("还原失败")
			}
			
		});
	}
</script>
</body>
</html>